package com.ktg.mes.erpBom.task;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ktg.common.exception.BussinessException;
import com.ktg.mes.erpBom.service.IErpProductStructureService;
import com.ktg.mes.erpBom.service.IT6ErpProductStructureService;
import com.ktg.mes.erpInventory.service.IErpInventoryService;
import com.ktg.mes.md.domain.MdItem;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * ERP - BOM物料 定时任务调度
 *
 * @author ruoyi
 */
@Slf4j
@Component("t6ErpProductSyncDataTask")
public class T6ErpProductSyncDataTask {
    @Autowired
    private IErpProductStructureService productStructureService;
    public void execute()
    {
        try {
            productStructureService.syncDataListByLastIdFromErp();
            log.info("T6ErpProductSyncDataTask -------------------  ");
        }catch (Exception ex){
            log.error("BOM物料 信息出错",ex);
            throw new BussinessException("执行失败");
        }
    }

}
